export function formatTime(time) {
  if (!time) {
    return "";
  }
  let date = new Date(time);
  let y = date.getFullYear();
  let M = date.getMonth() + 1;
  let d = date.getDate();
  let h = date.getHours();
  let m = date.getMinutes();
  let s = date.getSeconds();

  return `${y}-${M > 9 ? M : "0" + M}-${d > 9 ? d : "0" + d} ${
    h > 9 ? h : "0" + h
  }:${m > 9 ? m : "0" + m}:${s > 9 ? s : "0" + s} `;
}
